 {
        

        e("../UIManager/SafeLoader");
        var o = function () {
        };
        o.prototype = {
            ctor: function () {
            },
            showGroupRank: function (e, t) {
                if (Global.userProfile && Global.userProfile.getUserProfile()) {
                    var n = wx.getOpenDataContext(), o = [{
                        key: "chip",
                        value: Global.userProfile.getUserProfile().chip + ""
                    }];
                    n.postMessage({
                        method: "showGroupRank",
                        shareTicket: e,
                        userId: Global.userProfile.getUserId(),
                        KVDataList: o,
                        isSmall: t
                    });
                }
            },
            showFriendRank: function (e) {
                var t = wx.getOpenDataContext(), n = [{
                    key: "chip",
                    value: Global.userProfile.getUserProfile().chip + ""
                }];
                t.postMessage({
                    method: "showFriendRank",
                    userId: Global.userProfile.getUserId(),
                    KVDataList: n,
                    isSmall: e
                });
            },
            showBeInvitedAlert: function () {
                var e = Global.config.QueryTag.inviteFriReward;
                if (Global.query && Global.query.extraInfo && Global.query.extraInfo[e]) {
                    var t = Global.eventName.CMD_INVITE_FRIEND_HELP, n = parseInt(Global.userProfile.getUserId()),
                        o = parseInt(Global.query.extraInfo.userId);
                    Global.msgHandler.requestBeInviteFri(t, n, o);
                }
            },
            showGetRedPacket: function () {
                var e = Global.config.QueryTag.getRedPacket;
                if (Global.query && Global.query.extraInfo && Global.query.extraInfo[e]) {
                    var t = Global.eventName.CMD_REQUEST_REDPACKET_OPEN, n = Global.query.extraInfo.redPackId;
                    Global.msgHandler.requestSkipLuckRedPacket(t, n, 0);
                }
            },
            query_stringConnect: function (e) {
                var t = [];
                for (var n in e) {
                    var o;
                    o = n + "=" + e[n], t.push(o);
                }
                return t.join("&");
            },
            shareToGroup: function (e, t, n, o) {
                try {
                    if (!tywx.IsWechatPlatform()) return;
                    var i = this;
                    wx.updateShareMenu({
                        withShareTicket: !0,
                        success: function (a) {
                            console.log("share: tuyoo shareToGroup success, params:" + JSON.stringify(a));
                            var r = function (e) {
                                console.log("shareToGroup succCallback", e.shareTickets), cc.warn("shareToGroup succCallback " + e.shareTickets + "params== " + e),
                                    e && e.shareTickets && void 0 !== e.shareTickets ? i.getShareInfo(e.shareTickets[0], t, n) : (Global.utils.showNodeCommon("要分享到微信群里面哦", 3),
                                    n && n());
                            }, s = function (e) {
                                console.log("shareToGroup sharefailCallback", e), n && n();
                            }, l = {
                                share_type: e
                            };
                            o ? tywx.PropagateInterface.getWeightShareConfigInfoByTypeWithShare(l, o, r, s) : tywx.PropagateInterface.getWeightShareConfigInfoByTypeWithShare(l, null, r, s);
                        }.bind(this),
                        fail: function (e) {
                            console.log("share: tuyoo onQRcodeBtn fail, params:" + JSON.stringify(e)), n && n();
                        }
                    });
                } catch (e) {
                    console.log(" wx.updateShareMenu 出错了---\x3e"), console.log(e), n && n();
                }
            },
            getShareInfo: function (t, n, o) {
                console.log("onShareInfoBtn shareTicket:", t);
                var i = this;
                cc.sys.platform == cc.sys.WECHAT_GAME && t && wx.getShareInfo({
                    shareTicket: t,
                    success: function (t) {
                        console.log("onshare: tuyoo getShareInfo success", t, Global.config.wxAppId, Global.userProfile.getWXGameSessionKey());
                        var o = new (e("./WXBizDataCrypt.js"))(Global.config.wxAppId, Global.userProfile.getWXGameSessionKey()).decryptData(t.encryptedData, t.iv);
                        console.log("onshare: tuyoo getShareInfo success", JSON.stringify(o)), i.openGroupId = o.openGId,
                        n && (console.log("onshare: tuyoo getShareInfo success successcallbak"), n(i.openGroupId));
                    },
                    fail: function (e) {
                        console.log(e), o && o();
                    }
                });
            },
            getOpenGId: function () {
                return this.openGroupId;
            },
            checkOpenGId: function (e) {
                this.gidGroup = this.gidGroup || [], cc.warn("checkOpenGId =====" + e);
                var t = !1;
                for (var n in this.gidGroup) {
                    var o = this.gidGroup[n];
                    if (cc.warn("checkOpenGId for=====" + o), o === e) {
                        t = !0;
                        break;
                    }
                }
                return t || this.gidGroup.push(e), t;
            }
        },  module.exports = o
    }